package com.kongwg.exer2;

public class AccountTest {
	public static void main(String[] args) {
		
		Account test = new Account(1, 20000, 0.045);
		test.withdraw(30000);
		System.out.println("你的余额为"+ test.getBalance());
		test.withdraw(2500);
		System.out.println("你的余额为"+ test.getBalance());
		
		test.deposit(3000);
		System.out.println("你的余额为"+ test.getBalance());
		System.out.println("月利率为："+ (test.getMonthlyInterest())*100+"%");
		
		
		System.out.println("**************************");
		
		CheckAccount ca = new CheckAccount(1122, 20000, 0.145, 5000);
		
		ca.withdraw(5000);
	
		System.out.println("你的余额为"+ ca.getBalance());
		System.out.println("你的可透支为"+ ca.getOverdraft());
		
		ca.withdraw(18000);
		System.out.println("你的余额为"+ ca.getBalance());
		System.out.println("你的可透支为"+ ca.getOverdraft());
		
		
		ca.withdraw(3000);
		System.out.println("你的余额为"+ ca.getBalance());
		System.out.println("你的可透支为"+ ca.getOverdraft());
		
	}
}
